You are browsing the documentation for leaf v1. v3 @ leafphp.dev.
Join our community on discord

Leaf PHP v1.5.0 Create clean, simple but powerful web applications and APIs quickly.

Get Started Checkout v2.0 Checkout v3.0

Quickly Create PHP Projects

PHP made even simpler! Leaf is a simple but powerful web framework suitable for both pro devs and beginners alike. Leaf provides a ton of functionality which lets you easily get your project running💪

You are browsing the documentation for leaf v1. Click here for LTS.

What's new in v1.5.0

Leaf Database Tool

Leaf's "simple query builder" provides a convenient but usual way to quickly create and run database queries. It can be used to perform most database operations in your app.

Leaf's "simple query builder" currently supports Mysqli and PDO connections, though we still recommend using Mysqli. There's no need to worry about SQL injection as parameter binding is also supported and easy to use😉💪

View Leaf DB' docs here

Leaf Simple Auth

Setting up a login and sign-up system can sometimes be a very unpleasant experience, especially for new devs. For pro devs, the challenge is "the standard". For this, Leaf has prepared something really simple.

Leaf Simple Auth allows you to set-up authentication in just one line of code😅😅. Literally 1 line😎.

View auth docs

New Form Validate method

Leaf now provides a much simpler way to validate a parameter using Leaf Forms. In one line, you can create a bunch of rules to validate a parameter with. Validate simply makes sure that the passed selected parameters pass these validation tests. It's never been simpler😎

Parameters which fail the form validation are saved in the form's errors which can be accessed with errors()

View Form docs

Find out more here